BlueCielo Meridian Enterprise 2013 Developer's Guide | BlueCielo ECM Solutions

AMFolderUI object

The AMFolderUI object provides commonly used functionality to manipulate folder objects.

Supported Interfaces

IAMEdmItemsUIPersist interface

IAMEdmUICache interface

Remarks

The sample code below demonstrates how to use an AMFolderUI object.

AMFolderUI is a client-side object. Before it can be used, it must be initialized with an AMFolder object server object.

Example

The InvokeCopyDocumentsCommand procedure can be used to copy/derive/replace a document using the built-in copy functionality of the EDMUI client library.

Command values can be:

Public Sub InvokeCopyDocumentsCommand( _ 
    dsg As IAMUIExtensionDesigner, _
    ByVal doc As AMDocument, _
    ByVal command As AMEDMUI.AMITEMS_FLAGS, _
    ByVal hwnd As Long)
    On Error GoTo error_handler
    
    ' Create the AMFolderUI instance
    Dim ui As New AMFolderUI
    Dim nu As IAMEdmUINew
    Dim pers As IAMEdmUIPersist
    
    ' Get the folder object
    Dim f As AMFolder
    Set f = doc.ParentFolder
    
    ' Initialize AMFolderUI
    Set pers = ui
    pers.Init f, dsg.GetHostService(SERVICE_PROVIDER)
    
    ' Set the flags for the copy operation
    Dim Flags As Long
    Flags = AMIF_SINGLMODAL _
               Or AMIF_RECURSIVE _
               Or AMIF_SHOWPROGRESS _
               Or command
    ' The IDs of the documents that are copied must be provided
    ' as a variant containing an array of strings
    Dim a(0) As String
    Dim v As Variant
    a(0) = d.ID
    v = a
    
    ' Invoke the copy command
    Set nu = pers
    nu.SetOptions Flags
    nu.CopyDocuments hwnd, v
    
    Set nu = Nothing
    Set pers = Nothing
    Set ui = Nothing
    
    Exit Sub
error_handler:
    MsgBox Err.Description
End Sub

Copyright © 2000-2013 BlueCielo ECM Solutions